import pymysql  # MySQL 适用

def getData():
    # 连接数据库
    conn = pymysql.connect(host="localhost", user="root", password="123456", database="esl")
    cursor = conn.cursor()

    # 执行查询（从第 7 条开始）
    query = "SELECT menu_id, canteen_id ,menu FROM menu LIMIT 18446744073709551615 OFFSET 6;"
    cursor.execute(query)

    # 获取数据
    rows = cursor.fetchall()

    # 输出结果
    # for row in rows:
    #     print(row[0],row[1],row[2])

    # 关闭连接
    cursor.close()
    conn.close()
    return rows
